
package com.zsrt.day20170504.ch04;


public class TicketThreadTest {

	public static void main(String[] args) {
		
		TicketThread tk = new TicketThread();
		Thread tk1 = new Thread(tk);
		
		tk1.setName("窗口1");
		
		//TicketThread tk01 = new TicketThread();
		Thread tk2 = new Thread(tk);
		tk2.setName("窗口2");
		
		//TicketThread tk02 = new TicketThread();
		Thread tk3 = new Thread(tk);
		tk3.setName("窗口3");
		
		//TicketThread tk03 = new TicketThread();
		Thread tk4 = new Thread(tk);
		tk4.setName("窗口4");
		
		//TicketThread tk04 = new TicketThread();
		Thread tk5 = new Thread(tk);
		tk5.setName("窗口5");
		
		tk1.start();
		tk2.start();
		tk3.start();
		tk4.start();
		tk5.start();
		
	}
	
	
	/*public static void main(String[] args) {
		TicketThread t = new TicketThread();
		
		//线程默认名称从0开始
		new Thread(t).start();
		new Thread(t).start();
		new Thread(t).start();
		new Thread(t).start();
		new Thread(t).start();
	}*/
}
